<?php

namespace Syrius\Keys;

/**
 * Enter description here ...
 * @package	Keys
 * @author	Domenico Biancardi <domenico.biancardi@gmail.com>
 * @link	http://code.google.com/p/syrius/
 *
 */ class Primary extends Keys {
	/**
	 * Ritorna la rappresentazione della chiave
	 */
	public function __toString() {
		$str = parent::__toString();
		if ($this->indexType)
			$str .= " " . $this->indexType;
		$str .= " (`" . $this->indexColName [0] . "`)";
		$str .= implode(" ", $this->indexOptions);
		return $str;
	}

	public function __construct($index_name, $index_opts = array()) {
		parent::__construct($index_name, $index_opts);
		$this->indexType = "PRIMARY KEY";
	}

}

?>
